package com.cjm.one.model.goods.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Data;

@Data
@AllArgsConstructor
public class StockDeductionDTO {
    @Schema(description = "SKU ID")
    @NotNull(message = "SKU ID不能为空")
    private Long skuId;

    @Schema(description = "扣减数量")
    @Min(value = 1, message = "扣减数量必须大于0")
    private Integer skuNum;

    @Schema(description = "版本号")
    private Long version; // 内部使用，不需要前端传
}